#!/usr/bin/python
# -*- coding: UTF-8 -*-

""" 
@version: 1.0
@author: jin.li.o
@license: Apache Licence 
@contact: x.leevin@gmail.com
@software: PyCharm
@file: clazz_i_01.py
@time: 2018/9/30
"""


def pay(price, discount):
    print("本次消费金额:{0},折扣{1},优惠后价格:{2}".format(price, discount, price * (1 - discount)))


str_price = input("请输入总费用:")
int_price = int(str_price)

if 100 >= int_price >= 50:
    pay(int_price, 0.1)
elif int_price > 100:
    pay(int_price, 0.2)
else:
    print("本次消费{0},未达到优惠限度".format(int_price))
